@import "variables";

.multi-step {

    &,
    * {
        box-sizing: border-box;
        font-family: $font_family;
    }

    *::after {
        box-sizing: border-box;
    }

    *::before {
        box-sizing: border-box;
    }

    .btn {
        box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 5px 0px, rgba(0, 0, 0, 0.12) 0px 2px 10px 0px;
        cursor: pointer;
        text-transform: uppercase;
        white-space: normal;
        overflow-wrap: break-word;
        color: rgb(255, 255, 255);
        line-height: 1.5;
        transition: color 0.15s ease-in-out 0s, background-color 0.15s ease-in-out 0s, border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
        margin: 0.375rem;
        border-width: 0px;
        border-style: initial;
        border-color: initial;
        border-image: initial;
        border-radius: 0.125rem;
        position: relative;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        font-size: 0.64rem;
        padding: 0.5rem 1.6rem;

    }

    .modal-header {
        flex-wrap: wrap;

        .modal-title {
            text-align: center;
            flex: 1 0 auto;
            font-size: 0.8rem;
        }

        .modal-steps {
            flex: 0 0 100%;
            justify-content: space-around;
            display: flex;
            padding-top: 0.3rem;

            .step {
                width: 100%;
                position: relative;
                display: flex;
                flex-wrap: wrap;
                justify-content: center;

                &:first-child:before {
                    width: 50% !important;
                    left: unset;
                    right: unset;
                    transform: translateX(51%);
                }

                &:first-child:after {
                    width: 50% !important;
                    left: unset;
                    right: unset;
                    transform: translateX(51%);
                }

                &:last-child:before {
                    width: 50% !important;
                    left: 0;
                }

                &:last-child:after {
                    width: 50% !important;
                    left: 0;
                }

                &:before {
                    position: absolute;
                    border: 1px solid;
                    width: 100%;
                    height: 1px;
                    display: block;
                    z-index: 1;
                    top: ($step_dot_width/2+1);
                    content: '';
                }

                &:after {
                    position: absolute;
                    border: 1px solid;
                    width: 0%;
                    height: 1px;
                    display: block;
                    z-index: 1;
                    top: ($step_dot_width/2+1);
                    left: 0;
                    content: '';
                    transition: $step_transition;
                }

                &.current {
                    &:after {
                        width: calc(50% - #{($step_dot_width/2)});
                        transition: $step_transition;
                    }

                    &:first-child:after {
                        width: 0% !important;
                        transition: $step_transition;
                    }

                }

                &.completed {
                    &:after {
                        width: 100%;
                        transition: $step_transition;

                    }
                }

                &.skipped {
                    &:after {
                        width: 100%;
                        transition: $step_transition;
                    }
                }

                .dot {
                    height: $step_dot_width;
                    width: $step_dot_width;
                    border-radius: $step_dot_width;
                    display: inline-block;
                    position: relative;
                    top: 0.125em;
                    z-index: 2;
                    margin: auto;
                    border: 1px solid;

                    &:before {
                        content: '';
                        position: absolute;
                        top: -1px;
                        left: -1px;
                        width: $step_dot_width;
                        height: $step_dot_width;
                        transform: scale(0.75);
                        border-radius: $step_dot_width;
                    }
                }

                .label {
                    font-size: $step_label;
                    display: block;
                    margin: 0;
                    text-align: center;
                    flex: 0 0 100%;
                    margin-top: 0.5em;
                    margin-bottom: 0.5em;
                }
            }
        }
    }

    .modal-body {
        .step-content-container {
            position: relative;
            height: 100%;

            .step-content {
                display: none;
                position: relative;
                top: 0;
                left: 0;
                width: 100%;

                .content-inner {
                    position: relative;
                }

                &.active {
                    display: inline-block;
                }
            }
        }
    }

    .modal-footer {
        .btn-prev {
            margin-right: auto;
        }

        .btn-skip {
            display: none;

            &.skippable {
                display: block;
            }
        }

        .disabled,
        :disabled {
            cursor: not-allowed;
        }
    }
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;

    p {
        margin: 0;
    }

    ul {
        text-align: center;

        li {
            margin-bottom: 1rem;

            &:last-of-type {
                margin-bottom: 0;
            }
        }
    }
}